load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "partition",
    srcs = [
        "locality.go",
        "testutils.go",
    ],
    importpath = "github.com/cockroachdb/cockroach/pkg/sql/opt/partition",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/sql/opt/cat",
        "//pkg/sql/sem/eval",
        "//pkg/sql/sem/tree",
        "//pkg/sql/types",
        "//pkg/util/intsets",
        "@com_github_cockroachdb_errors//:errors",
        "@com_github_lib_pq//oid",
    ],
)

go_test(
    name = "partition_test",
    srcs = ["locality_test.go"],
    embed = [":partition"],
    deps = [
        "//pkg/settings/cluster",
        "//pkg/sql/opt/testutils/testcat",
        "//pkg/sql/sem/eval",
        "//pkg/sql/sem/tree",
        "//pkg/sql/types",
        "//pkg/util/intsets",
        "//pkg/util/leaktest",
    ],
)
